# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         text12
# Description:   例23.12
# Author:       ASUS
# Date:         2019/4/7
#-------------------------------------------------------------------------------


from numpy import *
price,weights = loadtxt("data.csv",delimiter=",",usecols=(6,7),unpack=True)
print(price)
print(weights)
#计算成交量加权平均价格
vwap = average(price,weights = weights)
print("vwap","=",vwap)

